<template>
  <el-dialog
    title="异动审批"
    :model-value="modelValue"
    @close="closed"
    width="400px"
  >
    <el-form label-width="80px" :model="form">
      <el-form-item label="是否通过" prop="isPass">
        <el-select v-model="form.isPass" placeholder="请选择" clearable style="width: 100%;">
          <el-option
            v-for="dict in dl_ispass"
            :key="dict.label"
            :label="dict.label"
            :value="dict.label"
          />
        </el-select>
      </el-form-item>
      <el-form-item label="审批内容" prop="reviewContent">
        <el-input v-model="form.reviewContent" placeholder="" type="textarea"/>
      </el-form-item>
    </el-form>

    <template #footer>
      <span class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="closed">关闭</el-button>
      </span>
    </template>
  </el-dialog>
</template>
  
<script setup>

const { proxy } = getCurrentInstance();
const { dl_ispass } = proxy.useDict("dl_ispass");

const props = defineProps({
  formId: {
    type: String,
  },
  modelValue: {
    type: Boolean,
    required: true,
  },
});
const emits = defineEmits(["update:modelValue", "review"]);

const data = reactive({
  form: {},
});

const { form } = toRefs(data);

/**
 * 关闭
 */
const closed = () => {
  emits("update:modelValue", false);
};

const submitForm = () => {
  emits("review", form.value);
      closed();
};
</script>
  
  <style lang="scss" scoped>
.center {
  text-align: center;
  .title {
    margin-bottom: 12px;
  }
}
</style>